package com.runfast.paotui.service.impl;

import com.runfast.common.service.BaseService;
import com.runfast.paotui.dao.mapper.RunfastShopperMapper;
import com.runfast.paotui.dao.model.RunfastShopper;
import com.runfast.paotui.dao.model.RunfastShopperExample;
import com.runfast.paotui.service.RunfastShopperService;
import com.runfast.waimai.util.PageBean;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.Map;

@Service
public class RunfastShopperServiceImpl extends BaseService<RunfastShopper, Integer, RunfastShopperExample> implements RunfastShopperService {
   @Resource
    RunfastShopperMapper dao;

    @Override
    public void addtoken(RunfastShopper shopper) {
        dao.addtoken(shopper);
    }

    @Override
    public List<Map<String, Object>> findbyGoods() {
        return dao.findbyGoods();
    }

    @Override
    public RunfastShopper findByUserName(String userName) {
        return dao.findByUserName(userName);
    }

    @Override
    public void update(RunfastShopper shopper) {
        dao.update(shopper);
    }

    @Override
    public List<RunfastShopper> findByAll() {
        return dao.findByAll();
    }

    @Override
    public RunfastShopper findByNumeber(String munber) {
        return dao.findByNumeber(munber);
    }

    @Override
    public void updateNumber(RunfastShopper shopper) {
        dao.updateNumber(shopper);
    }

    @Override
    public RunfastShopper get(Integer id) {
        return dao.get(id);
    }

    @Override
    public List<Map<String, Object>> countShopperIncome(String key, Date startTime, Date endTime, Integer page, Integer pageSize, Integer tAccounts) {
        return dao.countShopperIncome(key,startTime,endTime,page,pageSize,tAccounts);
    }

    @Override
    public Integer getShopperCount() {
        return dao.getShopperCount();
    }

    @Override
    public PageBean<RunfastShopper> getPageBean(int pageSize, int page, RunfastShopper t, List<Integer> agentIds) {
        return dao.getPageBean(pageSize,page,t,agentIds);
    }

    @Override
    public List<RunfastShopper> findByCreditLevelid(Integer creditLevelid) {
        return dao.findByCreditLevelid(creditLevelid);
    }

    @Override
    public void updatepassword(RunfastShopper shopper) {
dao.updatepassword(shopper);
    }

    @Override
    public void updateAlias(RunfastShopper shopper) {
        dao.updateAlias(shopper);
    }

    @Override
    public void updateUserName(RunfastShopper shopper) {
            dao.updateUserName(shopper);
    }

    @Override
    public List<RunfastShopper> findBuAgentId(Integer agentId, Integer teamid) {
        return dao.findBuAgentId(agentId, teamid);
    }

    @Override
    public List<RunfastShopper> findAgentidAndWordtypeAndWorkingAndName(Integer agentid, Integer work_Type, Integer working, String name) {
        return dao.findAgentidAndWordtypeAndWorkingAndName(agentid,work_Type,working, name);
    }

    @Override
    public List<RunfastShopper> findNameAndAgerenAndTime(Integer agentid, String name, Date createtime1, Date createtime2) {
        return dao.findNameAndAgerenAndTime(agentid, name, createtime1, createtime2);
    }

    @Override
    public List<RunfastShopper> findToday(Integer id, Date createtime1, Date createtime2) {
        return dao.findToday(id,createtime1,createtime2);
    }

    @Override
    public void updatelatitude(RunfastShopper runfastShopper) {
        dao.updatelatitude(runfastShopper);
    }
}